The present invention relates to a method and a device capable of automatic drift compensation for a position-loop controller.
FIG. 1 shows a conventional position-loop controller which comprises a position-loop control (1), a signal generator (2), an amplifier (3), a motor (4), and a rotary coded signal generator (5).
In the automatic control process, an instruction is first generated from the position-loop (1), a control signal being sent via the signal generator (2). Said signal, after being amplified by the amplifier (3), is input to the motor (4), causing said motor to rotate. At the same time, position data are fed back to the position-loop by the rotary coded signal generator such that accurate position control can be effected by comparing the feedback signal and the control signal.
FIG. 2 is a diagram showing the relation between the displacement and time during position control in which the X and the Y axes represent the time and the accumulated displacement, respectively. Line L represents the line of instruction displacement and line L', the line of actual displacement.
At time point T0, both the instruction displacement and the actual displacement are 0. When the position instruction is input and the motor starts to rotate, the actual displacement tends to lag behind the instruction displacement due to the electrical and mechanical characteristics as well as the inertia of the motor. For example, when at T1, the instruction displacement should be P1 but the actual displacement is P1'; there will be a lag error of PE. Let the accumulated instruction position be .SIGMA.PC and the feedback position be .SIGMA.PF, then, the lag error should be: EQU PE=.SIGMA.PC-.SIGMA.PF (1)
Upon arriving at time T2, the accumulated instruction position .SIGMA.PC will reach at P2, then the accumulated feedback position will reach only at .SIGMA.PC-PE=P2' such that while the signal generator (2) no longer outputs signals, the position-loop does not cause the motor to stop rotating until at T3 when line L' reaching at point P2, then PE should be 0.
FIG. 3 is a diagram showing the relation between PE(drift) and time. AT T0, PE=0 and then increases gradually until reaching a given value at T1, this given value being retained thereafter until at T2 and then decreases gradually to become 0 at T3, meaning that the position movement is accomplished. Then the next step of position control will be taken.
With conventional position-loop controllers, the in-position check is performed by means of the changing characteristics of the PE value, i.e., it is based on that the position control operation is considered as being accomplished when PE is 0.
In such conventional drift compensation methods and devices, the output from the control loop is converted into analog signals by a digital-to-analog converter and then delivered to a servo-driver, which inherently results in drift to be applied to said lag error, causing the control system to shift. In other words, the resulting lag error does not equal the PE mentioned above. If the lag error PE thus obtained is to be used as the basis for said position control, it would be impossible for the system to be reset and hence difficult to make the correct "in-position checks". Consequently, execution of the programs tends to result in errors. To make matter even worse, it would be impossible to obtain the "in-position" decision such that the system would be unable to take the next step of position control, thus causing the machine to stop executing the instructions.
It is frequent with the conventional devices to set a decision value (for example, 10) so as avoid the trouble of machine shutdowns. When the absolute value of the lag error has been compensated to below the set decision value (E.ltoreq.10), a decision of "in-position" will be made and the machine will be instructed to take the next step of position control.
While most of the shutdowns can be avoided in this way, the correctness of the control position is significantly decreased. Also, when the lag error is beyond the set decision value (for example, 12) and cannot be reset, the machine will still stop operating.
Therefore, there is an urgent need in the industry for a a method and a device for automatic drift compensation in a position-loop controller which ensures both correct position control and the proper operation of the machine.